/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package metodos_estaticos_tema3;



/**
 *
 * @author Alex
 */
public class factorial_5_primeros {

    /**
     * @param args the command line arguments
     */
    public static void main(String args []) {
         
    
       
        byte n=6; 
        short factorial;
        factorial=factorial_5_primeros.calcularfactorial(n);
               
        System.out.println("El factorial de "+n+" es "+factorial);
    }

    
    public static short calcularfactorial (byte n)
    {
        short f=1;
        for(int i=1;i<=n;i++) f*=i;
        return f;
    }
}
